<?php
set_time_limit(0);
ini_set('max_execution_time', 30000);
define('NO_AUTO_DISPATCH', true);
require 'inc.php';
Core::main();
// Tools::authcode();
// exit;
header('content-type:text/plain;charset=utf-8');
// echo '<pre>';
// echo time();
echo "\n\n";


// $_SESSION['uid'] = 10001;
// $_SESSION['username'] = 'clq329';



// echo UMath::dec2any(3843402187584);
// echo "\n\n";
// echo UMath::any2dec('A1b0');
// echo crc32('XNDU4NTY3NDEy');

$file = './aphorism.txt';
// $content = file_get_contents($file);
// $content = preg_replace('/[ ]+/', "\t", $content);
// file_put_contents($file, $content);
// $list = array();
$aphorism = file($file);
foreach ($aphorism as $v)
{
	$tmp = explode("\t", $v);
	$list[] = array(
		'content' => trim($tmp[0]),
		'author' => trim($tmp[1]),
	);
}
file_put_contents(APP_PATH.'data/aphorism.php', '<?php return '.var_export($list,true).';');
// Db::insert('aphorism', $list, true);
// var_export($list);


echo "\n";
echo microtime(1) - APP_BEGIN_TIME;


